package com.atguigu.gulimall.order.feign;

import com.atguigu.common.utils.R;
import com.atguigu.common.vo.MemberAddressVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("gulimall-member")
public interface MemberFeign {

    /**
     * 获取用户地址信息
     */
    @GetMapping("member/memberreceiveaddress/address/{id}")
    public List<MemberAddressVo> getAddress(@PathVariable("id") Long memberId);

    /**
     * 根据id获取用户收获地址信息
     * @return
     */
    @GetMapping("member/memberreceiveaddress/address")
    public R getAddressId(@RequestParam("addrId") Long id);

}
